import axios from "axios";

const http = axios.create({
  baseURL: import.meta.env.VITE_SEREVER_HOST as string,
});

http.interceptors.request.use((config) => {
  if (localStorage.token) {
    config.headers.Authorization = "Bearer " + localStorage.token || "";
  }
  return config;
});

export { http };
